<?php 
class SiteConfigBehavior extends CBehavior
{
    /**
     * Declares events and the event handler methods
     * See yii documentation on behavior
     */
    public function events()
    {
        return array_merge(parent::events(), array(
            'onBeginRequest'=>'beginRequest',
        ));
    }
 
    /**
     * Load configuration that cannot be put in config/main
     */
    public function beginRequest()
    {
       /*if (isset($_REQUEST['lang'])){
       		$lang = $_REQUEST['lang'];
			$this->owner->user->setState('applicationLanguage', $lang);
       }else{
       		$this->owner->user->setState('applicationLanguage', 'vi');
       }
       
       if ($this->owner->user->getState('applicationLanguage'))
            $this->owner->language=$this->owner->user->getState('applicationLanguage');
        else 
            $this->owner->language='vi';
        */  
    }
}
?>